package com.xxx.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xxx.enums.StatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("`role`")
public class Role {
    /**角色名称**/
    private String roleName;
    /**角色key**/
    private String roleKey;
    /**角色id**/
    @TableId(type = IdType.ASSIGN_ID)
    //过长前端接收long类型会丢失精度  所以要转成string
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long roleId;
    /**描述**/
    private String remark;
    /**创建时间**/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createTime;
    /**修改时间**/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate updateTime;
    /**创建用户**/
    private String createUser;
    /**修改用户**/
    private String updateUser;
    /**状态 0正常 1禁用**/
    private StatusEnum status;
    /**删除 0正常 1删除**/
    @TableField("`delete`")
    @TableLogic // 标记为逻辑删除字段
    private Integer delete;






}
